{% extends "bl_g/admin/admin_base.html" %}

{% block title %}Index of all entries{% endblock %}

{% block article %}

    <h1>Index of all entries</h1>
    <p><a href="{% url bl_g_admin_create %}">New entry</a></p>
	<h2>Existing entries</h2>
    {% if entries %}
        {% for entry in entries %}
            <div>
            	<a href="{% url bl_g_admin_edit entry.slug %}">{{ entry.title }}</a>
				<form action="{% url bl_g_admin_delete %}" method="POST">
					<input type="hidden" name="slug" value="{{ entry.slug }}">
			        <input type="submit" value="Delete">
			    </form>
			</div>
        {% endfor %}
    {% else %}
       <p>No entries yet.</p>
    {% endif %}
{% endblock %}